package net.zjitc.hashset;

/**
 * @Author admin
 * @Date 2019/4/2 16:40
 */
public class Student {
    private String nmae;

    @Override
    public String toString() {
        return "Student{" +
                "nmae='" + nmae + '\'' +
                '}';
    }

    /**
     *重写equals、hashCode方法的原因
     * 比较俩对象时，比较的是内容。（若不重写，比较的是地址）
     * HashSet能保证元素唯一，必须重写这两个方法*/

   /* @Override
    public boolean equals(Object o){

    }
*/
    public Student() {
    }

    public Student(String nmae) {
        this.nmae = nmae;
    }

    public String getNmae() {
        return nmae;
    }

    public void setNmae(String nmae) {
        this.nmae = nmae;
    }
}
